from django.db import models
import time

# Create your models here.
class Channel(models.Model):
    type = models.PositiveIntegerField()
    name = models.CharField(max_length=255)
    live_user_id = models.CharField(max_length=255)
    channel_number = models.CharField(max_length=64)
    channel_passwd = models.CharField(max_length=255)
    url = models.CharField(max_length=255)
    stream = models.CharField(max_length=255)
    scene = models.CharField(max_length=64)
    max_viewer = models.PositiveIntegerField()
    start_time = models.DateTimeField('Edit the date', auto_now_add=True)
    publisher = models.CharField(max_length=255)
    publisher_duty = models.CharField(max_length=255)
    create_user_id = models.PositiveIntegerField()
    be_email = models.CharField(max_length=255)
    ctime = models.PositiveIntegerField(default=time.time())
    utime = models.PositiveIntegerField(default=time.time())

    class Meta:
        app_label = 'live'
        managed = False
        db_table = 'pf_channel'
